package com.ws.lv.service.impl;

import com.ws.lv.bean.Order_info;
import com.ws.lv.mapper.Order_infoMapper;
import com.ws.lv.service.Order_infoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class Order_infoServiceImpl implements Order_infoService {

    @Autowired
    Order_infoMapper order_infoMapper;


    @Override
    public List<Order_info> selectOrder_infos(String user_name, String route_name) {
        return order_infoMapper.selectOrder_infos(user_name,route_name);
    }

    @Override
    public int updateOrder_infoByState(int order_info_id) {
        return order_infoMapper.updateOrder_infoByState(order_info_id);
    }

    @Override
    public int deleteOrder_infos(ArrayList<Integer> orderInfoIds) {
        return order_infoMapper.deleteOrder_infos(orderInfoIds);
    }

    @Override
    public Order_info selectOrder_infoByUserIdAndRouteId(int order_info_userId, int order_info_routeId) {
        return order_infoMapper.selectOrder_infoByUserIdAndRouteId(order_info_userId,order_info_routeId);
    }

    @Override
    public int insertOrder_info(Order_info order_info) {
        return order_infoMapper.insertOrder_info(order_info);
    }

    @Override
    public List<Order_info> selectOrder_infosByUserId(int user_id) {
        return order_infoMapper.selectOrder_infosByUserId(user_id);
    }

    @Override
    public int deleteOrder_infoByUserId(int user_id) {
        return order_infoMapper.deleteOrder_infoByUserId(user_id);
    }

    @Override
    public int deleteOrder_infoByRouteId(int route_id) {
        return order_infoMapper.deleteOrder_infoByRouteId(route_id);
    }


}
